from rest_framework import serializers
from app.type_enum import SexEnum


class AddUserWorkerInfoSerializers(serializers.Serializer):
    name = serializers.CharField(max_length=20, help_text="姓名")
    openid = serializers.CharField(help_text="用户唯一标识")
    sex = serializers.ChoiceField(choices=[i.name for i in SexEnum], help_text="性别")
    phone = serializers.CharField(max_length=11, min_length=11, help_text="手机号")
    email = serializers.EmailField(allow_blank=True, help_text="邮箱")
    education = serializers.CharField(max_length=20, help_text="学历")
    work_start_date = serializers.DateField(help_text="工作开始日期")
    work_end_date = serializers.DateField(help_text="工作结束日期")

    work_type_list = serializers.ListField(child=serializers.CharField(), help_text="工作领域")
    work_position_list = serializers.ListField(child=serializers.CharField(), help_text="工作岗位")

    other_work_type = serializers.CharField(allow_blank=True, max_length=64, help_text="其他工作领域")
    other_work_position = serializers.CharField(allow_blank=True, max_length=64, help_text="其他工作岗位")
